#ifndef __RENDERERBASE_H__
#define __RENDERERBASE_H__

#include <vector>

/*abstract*/ class RendererBase
{
public:
	std::vector<Mesh> Meshes;

	void Render()
	{
		// FIXME: sort!

		PreRender();

		for (std::vector<Mesh>::iterator it = Meshes.begin(); it != Meshes.end(); ++it)
			RenderMesh(*it);
			
		PostRender();

		Meshes.clear();
	}

	virtual void PreRender() { }
	virtual void PostRender() { }
	virtual void RenderMesh(const Mesh &mesh) = 0;
};

#endif